import { Entity, PrimaryGeneratedColumn, Column } from 'typeorm';
import { CommonEntity } from '@entity/common.entity';
import { ListDropsDTO } from '@dto/jx3/drops.dto';

// 参数配置表 -  实体类
@Entity('jx3_copy_record', { comment: '' })
export class CopyRecordEntity extends CommonEntity {
  // 唯一Id标识，varchar(100)
  @PrimaryGeneratedColumn()
  id: string; // 可以是 number、string 等类型，根据你的需求选择

  // 用户id，varchar(50)
  @Column({
    type: 'varchar',
    length: 50,
    name: 'user_id',
    comment: '用户id',
  })
  userId: string;

  // 副本名称，varchar(40)
  @Column({
    type: 'varchar',
    length: 40,
    name: 'copy_name',
    comment: '副本名称',
  })
  copyName: string;

  // 副本工资，varchar(50)
  @Column({
    type: 'varchar',
    length: 50,
    name: 'copy_wages',
    comment: '副本工资',
  })
  copyWages: string;

  // 副本消费，varchar(50)
  @Column({
    type: 'varchar',
    length: 50,
    name: 'copy_use',
    comment: '副本消费',
  })
  copyUse: string;

  // 备注，varchar(200)
  @Column({
    type: 'varchar',
    length: 200,
    name: 'copy_desc',
    comment: '备注',
  })
  copyDesc: string;

  // 玄晶数量，int(2)
  @Column({
    type: 'int',
    name: 'copy_xuan_jing',
    comment: '玄晶数量',
  })
  copyXuanJing: number;

  // 特殊数量，int(2)
  @Column({
    type: 'int',
    name: 'copy_special',
    comment: '特殊数量',
  })
  copySpecial: number;

  // 创建时间，datetime(无上限)
  @Column({
    type: 'datetime',
    name: 'create_time',
    comment: '创建时间',
  })
  createTime: string;

  // 创建人，varchar(50)
  @Column({
    type: 'varchar',
    length: 50,
    name: 'create_by',
    comment: '创建人',
  })
  createBy: string;

  // 更新时间，datetime(无上限)
  @Column({
    type: 'datetime',
    name: 'update_time',
    comment: '更新时间',
  })
  updateTime: string;

  // 新增 list 属性（不映射到数据库）
  list?: ListDropsDTO[]; //
}
